Refining quilts of patches representing three dimensional structures

ABSTRACT

Methods, systems, and apparatus, including computer program products, are provided for refining quilts of patches representing three dimensional structures. A method is provided that includes generating a first quilt representation of a three-dimensional structure, adding information to the first quilt representation, and generating a second quilt representation based on the first quilt representation. The first quilt representation is based on a model and associated with a first display level of detail. The second quilt representation is associated with a second display level of detail higher than the first display level of detail.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application Ser.No. 61/205,775, filed Jan. 23, 2009, the entire contents of which arehereby incorporated by reference.

BACKGROUND

Various three-dimensional (3D) modeling systems use geometric models ofstructures with varying degrees of precision. Some systems use both aprecise model (for instance, a Boundary Representation model) and anapproximate mesh representation (for instance, a mesh of triangles) thatis based on the precise model. The system generates the meshrepresentation by faceting (in other words, tessellating) the precisemodel. The system uses the mesh representation, rather than the precisemodel, for display in some situations to save memory or processing timeor both. In some 3D modeling systems, display hardware is optimized todisplay mesh representations.

When a 3D modeling system displays a structure using a meshrepresentation, the display of the structure can be good in certainviews and bad in other views. For example, the system can load a meshrepresentation of a structure with sufficient detail (that is, asufficient display level of detail) so that it accurately represents aprecise model of the structure when the user is viewing it at a 50% zoomlevel. But when the user zooms in to a 100% zoom level, the meshrepresentation can appear to be different from the precise model. A 3Dmodeling system may not generate a new mesh representation when the userzooms in to save memory or processing time or for other reasons.

FIG. 1A shows a mesh representation 100 of a model of a structuredisplayed at a first zoom level. The mesh representation 100 isassociated with a display level of detail appropriate for the first zoomlevel. At this first zoom level, the circular holes 102 appear to beperfect circles. FIG. 1B shows the same mesh representation 100displayed at a second zoom level. At this second zoom level, thecircular holes 102 appear to have jagged edges.

A mesh representation that appears differently than expected can bealarming to a user. In particular, a user of Computer Aided Design (CAD)software may be designing precise mechanical structures that need to fitother structures or have certain structural properties. If a structuredoes not appear as specified in a precise model, the user can becomedistrustful of the entire system.

One technique for improving the appearance of meshes of trianglesinvolves replacing flat triangles with cubic Bezier patches, a curvedshape that can be divided (by faceting) into a number of smaller flatsubtriangles. Each original triangle includes, for each of its vertices,a surface normal vector. The surface normal vectors are typicallyincluded with a mesh of triangles to permit advanced shading or forother purposes. However, the surface normals can be used to determineBezier control points associated with the triangles. The triangles,including their surface normal vectors and Bezier control points, areknown as “curved point-normal triangles,” “PN triangles,” or “N-patches”(hereafter “N-patches”). TRUFORM technology by ATI Technologies,currently owned by Advanced Micro Devices (AMD) of Sunnyvale, Calif.,uses N-patch techniques.

SUMMARY

In general, one or more aspects of the subject matter described in thisspecification can be embodied in one or more methods that includegenerating a first quilt representation of a three-dimensionalstructure, including: identifying a model of the three-dimensionalstructure; and faceting the model and generating the first quiltrepresentation, the first quilt representation including a plurality ofpatches, the first quilt representation being associated with a firstdisplay level of detail, where the faceting is performed by one or morefirst processors. Information is added to the first quiltrepresentation, including: identifying an external edge of thethree-dimensional structure based on the model, identifying a firstpatch in the plurality of patches, the first patch including a firstplurality of vertices, and a first vertex of the first plurality ofvertices being on the identified external edge, and determining an edgedirection vector for the identified external edge at the first vertexbased on the model. A second quilt representation is generated based onthe first quilt representation, including: determining one or more firstcontrol points for the first patch based on the first vertex and theassociated edge direction vector, and associating the one or more firstcontrol points with the first quilt representation to generate thesecond quilt representation, the second quilt representation beingassociated with a second display level of detail, the second displaylevel of detail being higher than the first display level of detail.Other embodiments of this aspect include corresponding systems,apparatus, and computer program products.

These and other embodiments can optionally include one or more of thefollowing features. Adding information to the first quilt representationcan further include: identifying a second patch in the plurality ofpatches, the second patch including a second plurality of vertices, asecond vertex being in the second plurality of vertices, determining anormal vector for the second patch using the model, the normal vectorbeing normal to the surface of the three-dimensional structure at thesecond vertex, and associating the normal vector with the second vertex.Generating a second quilt representation based on the first quiltrepresentation can further include: determining one or more secondcontrol points for the second patch based on the second vertex and theassociated normal vector, and faceting the first quilt representationusing the one or more second control points.

Generating the second quilt representation can be performed in responseto a request for the second display level of detail. The edge directionvector can be normal or tangent to the direction of curvature of theidentified external edge at the first vertex. The model of thethree-dimensional structure can be one of: a boundary representation (Brep) model, a function representation (F-rep) model, or a constructivesolid geometry model (CSG). The method can further include generating amesh representation of the 3-D dimensional structure, including facetingthe second quilt representation using the one or more control points,the mesh representation including a plurality of triangles. The one ormore first processors can comprise a central processing unit (CPU), andgenerating the mesh representation can be performed by one or moresecond processors, where the one or more second processors comprise agraphics processing unit (GPU). Determining the one or more firstcontrol points can be performed by the CPU. Determining the one or morefirst control points can be performed by the GPU.

In general, one or more aspects of the subject matter described in thisspecification can be embodied in one or more methods that includegenerating a first quilt representation of a three-dimensionalstructure, including: identifying a model of the three-dimensionalstructure, and faceting the model and generating the first quiltrepresentation, the first quilt representation including a plurality ofpatches, the quilt representation being associated with a first displaylevel of detail, where the faceting is performed by one or more firstprocessors. Information is added to the first quilt representation,including: identifying a surface on the three-dimensional structure inthe model, the surface including cross-curvature components, identifyinga first patch in the plurality of patches, the first patch including afirst plurality of vertices, and a first vertex of the first pluralityof vertices being on the identified surface, using the model,determining texture coordinate data for the first vertex and associatingthe texture coordinate data with the first vertex, and using the model,determining cross-curvature direction data for the first vertex andassociating the cross-curvature direction data with the first vertex. Asecond quilt representation is generated based on the first quiltrepresentation, including: determining a tangent vector for the firstvertex based on the associated texture coordinate data and theassociated cross-curvature direction data, determining one or more firstcontrol points for the first patch based on the first vertex and thetangent vector; and associating the one or more first control pointswith the first quilt representation to generate the second quiltrepresentation, the second quilt representation being associated with asecond display level of detail. Other embodiments of this aspect includecorresponding systems, apparatus, and computer program products.

These and other embodiments can optionally include one or more of thefollowing features. Adding information to the first quilt representationcan further include: identifying a second patch in the plurality ofpatches, the second patch including a second plurality of vertices, asecond vertex being in the second plurality of vertices, determining anormal vector for the second patch using the model, the normal vectorbeing normal to the surface of the three-dimensional structure at thesecond vertex, and associating the normal vector with the second vertex.Generating a second quilt representation based on the first quiltrepresentation can further include: determining one or more secondcontrol points for the second patch based on the second vertex and theassociated normal vector, and faceting the first quilt representationusing the one or more second control points.

Generating the second quilt representation can be performed in responseto a request for the second display level of detail. The structure canbe one of: a torus, a toroid, a toroidal fillet, a helical structure, ahelical coil, or another structure including a surface with curvature indirections tangent to the surface. The model of the three-dimensionalstructure can be one of: a boundary representation (B rep) model, afunction representation (F-rep) model, or a constructive solid geometrymodel (CSG). The method can further include generating a meshrepresentation of the 3-D dimensional structure, including faceting thesecond quilt representation using the one or more control points, themesh representation including a plurality of triangles. The one or morefirst processors can comprise a central processing unit (CPU), andgenerating the mesh representation can be performed by one or moresecond processors, where the one or more second processors comprise agraphics processing unit (GPU). Determining the one or more firstcontrol points can be performed by the CPU. Determining the one or morefirst control points can be performed by the GPU.

Texture coordinate data can include UV parameter information comprisinga U direction coordinate and a V direction coordinate. Texturecoordinate data can be based on the parameter space of the model.Cross-curvature direction data can include a U direction tangent vectorgiving the direction tangent to the surface in the U direction and a Vdirection tangent vector giving the direction tangent to the surface inthe V direction. Cross-curvature direction data can include scalar datagiving the aspect ratio of parameter space in the U and V directions.Determining a tangent vector based on the associated texture coordinatedata and the associated cross-curvature direction data can include:determining a difference vector comprising the difference in UVparameter space between the texture coordinates at the first vertex andthe texture coordinates at a second vertex at the other end of a patchedge associated with the first vertex; and determining the linearcombination of a U direction tangent vector and a V direction tangentvector at the first vertex and weighting the determined linearcombination using the difference vector; and determining the tangentvector based on the weighted linear combination.

Particular embodiments of the invention can be implemented to realizeone or more of the following advantages. A quilt of patches can begenerated from a model, for example, a precise geometric model. Thequilt of patches can be refined while preserving the appearance ofexternal edges in the quilt. The quilt of patches can be refined whilepreserving the appearance of surfaces with cross-curvature components inthe quilt. The quilt of patches can be accurately refined withoutreferring back to the original precise model, which can improve speed ormemory or both. A graphics processing unit (GPU) can refine the quilt ofpatches because refining the quilt of patches is simpler than generatinga quilt of patches from the model.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,aspects, and advantages of the invention will become apparent from thedescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed incolor. Copies of this patent or patent application publication withcolor drawing(s) will be provided by the Office upon request and paymentof the necessary fee.

FIG. 1A shows a mesh representation of a model of a structure displayedat a first zoom level.

FIG. 1B shows the same mesh representation displayed at a second zoomlevel.

FIG. 2 shows an example quilt of patches.

FIG. 3A shows an example quilt of patches and curved boundaries of aface that the quilt approximates.

FIG. 3B shows an example quilt with additional information regardingdetermining control points.

FIG. 4A shows a cylinder.

FIG. 4B shows a portion of a cylinder represented by a quilt of patcheswithin an example graphical interface of a 3D modeling system.

FIG. 4C shows a representation of an example slanted cylinder.

FIG. 4D shows a portion of a cylinder represented by a quilt of patches.

FIG. 4E shows an example fillet between the side of a slanted cylinderand the top of the cylinder.

FIG. 5A is a flow diagram of an example technique 500 of generating aquilt representation of a structure.

FIG. 5B is a flow diagram of an example technique 550 for refining afirst quilt representation for a higher display level of detail whilepreserving the appearance of external edges in the structure.

FIG. 6 shows a first torus and a second torus based on the first torus.

FIG. 7 shows a torus represented by a quilt of patches.

FIG. 8A is a flow diagram of an example technique 800 of generating aquilt representation of a structure.

FIG. 8B is a flow diagram of an example technique 850 for refining thefirst quilt representation for a higher display level of detail whilepreserving the appearance of surfaces with cross-curvature components inthe structure.

FIG. 9 shows three views of an example half-section torus raised from aplanar face.

FIG. 10 is a schematic diagram of a generic computer system.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

FIG. 2 shows an example quilt 200 of patches. A patch (for example,patch 202) is a polygon having multiple vertices. A vertex (for example,quilt boundary vertex 204) is a corner point of a polygon. In someimplementations, vertices are specified in Cartesian coordinates, whereeach vertex has an x coordinate, a y coordinate, and a z coordinate. Inother implementations, vertices are specified using other coordinatesystems, for example, spherical, cylindrical, and the like.

A quilt is a group of related patches. In a quilt, some or all of thepatches can be connected. For example, a quilt of patches can representa face of a 3D structure. Several quilts of patches representing facescan be connected to represent a 3D structure. In some implementations,several quilts of patches can be connected to form a quilt comprisingone or more connected quilts. For purposes of illustration, the examplequilt 200 is depicted in two dimensions; however, a quilt is typicallythree dimensional.

The example quilt 200 has external boundaries (for example quiltboundary curve A 206). Patch edges can be external edges (for example,external patch edge 208) and internal edges (for example, internal patchedge 210). An external edge is an edge on the external boundary. Forexample, where the quilt of patches represents a face of a 3D structure,the edges of the face are external edges. An internal edge is an edge onthe inside of a quilt. For example, where the quilt of patchesrepresents a face of a 3D structure, edges between patches internal tothe face (that is, in the interior of the face) are internal edges.

FIG. 3A shows an example quilt 300 of patches and curved boundaries of aface that the quilt 300 approximates. A patch (for example, patches 302and 304) optionally has information associated with it or with itsvertices. In some implementations, a patch has a surface normal vectorassociated with each of its vertices. A surface normal vector is avector indicating a direction normal (that is, perpendicular, ororthogonal) to the surface (typically the face of the surface as givenin a precise model) at that point. For example, a first example patch302 formed by vertices 1, 2, and 4 has surface normal vector N1associated with vertex 1, surface normal vector N2 associated withvertex 2, and surface normal vector N4 associated with vertex 4. In someimplementations, vectors are specified in Cartesian coordinates using atuple of scalar numbers. In other implementations, vectors are specifiedusing other coordinates, for example, in reference to spherical orcylindrical unit vectors. In various implementations, a patch hasassociated vectors in addition to or instead of surface normal vectors.

In the example quilt 300, the edge of the first example patch 302between vertices 1 and 2 is an external edge. That external edge is anapproximation of the true boundary curve B (for example, an edgecorresponding to a precise model edge). For example, boundary curve Bcan be specified by a precise model, and the example quilt 300 can bederived from the model (for instance, by faceting the model). The patchedge of the first example patch 302 between vertices 2 and 4 is aninternal edge of the example quilt 300. The patch edge of a secondexample patch 304 between vertices 2 and 4 shares that edge and is thusalso an internal edge of the example quilt 300.

In various implementations, a patch has associated vectors in additionto, or instead of, surface normal vectors. For example, edge directionvectors can be associated with patches and vertices of patches. An edgedirection vector is a vector that provides information about an edge,typically about an edge curve. In some implementations, an edgedirection vector points in a direction normal to the direction ofcurvature of an edge. For example, for a circular edge, the direction ofedge direction vectors along the edge point radially outward in theplane of the circular edge (in other words, the edge direction vectorsare orthogonal to the curve at each point along the edge). In otherimplementations, an edge direction vector is tangent to the true edgecurve at a vertex on the boundary curve.

For another example, in FIG. 3A, vertex 1 of the first example patch 302is associated with edge direction vectors B1 and C1. Edge directionvector B1 points in a direction normal to the curvature of edge B atvertex 1. Edge direction vector C1 points in a direction normal to thecurvature of edge C at vertex 1. Similarly, vertex 2 of the firstexample patch 302 is associated with edge direction vector B2.

Surface normal vectors, edge direction vectors, and other informationassociated with patches and vertices can be used to determine controlpoints (e.g., Bezier control points). The control points can beassociated with vertices. For example, the control points can beassociated with a vertex and a patch edge based on that vertex. Thus,control points can be determined for vertex 1 on the edge of the firstexample patch 302 between vertices 1 and 2. Similarly, control pointscan be determined for vertex 2 on the edge of the first example patch302 between vertices 1 and 4. Additional control points can bedetermined along patch edges, using the associated vectors (for example,surface normal vectors or edge direction vectors) at the endpoints ofeach such edge of the patch. Thus, the patches and the control pointscan form curved Bezier patches.

Various techniques for determining control points using associatednormal vectors are known to those of skill in the art. For example,N-patch technology uses surface normal vectors at each vertex in a meshof triangles to generate control points for the triangles. Furthermore,patches can have control points corresponding to surfaces of varyingorders. For example, third order surfaces (based on a cubic curve) aretypically used, but second order surfaces (for example, based on aquadratic or parabolic curve) and higher order surfaces are possible.

FIG. 3B shows an example quilt 310 with additional information regardingdetermining control points. In FIG. 3B, patch edges are labeled to showone way to select associated vectors while determining control points.

At vertex 2, control points can be determined for four patch edges: thepatch edge between vertex 2 and vertex 1, the patch edge between vertex2 and 4, the patch edge between vertex 2 and vertex 5, and the patchedge between vertex 2 and vertex 3. In each case, the surface normal atvertex 2, N2, can be used to determine control points. Alternatively, insome cases, a better result can be reached by using the edge directionvector at vertex 2, B2.

At vertex 2, for the patch edge between vertex 2 and vertex 1, the labelindicates that edge direction vector B2 can be used to determine controlpoints. Using edge direction vector B2 results in control points thatmore accurately represent curve B because the patch edge between vertex2 and vertex 1 is an external edge. Similarly, edge direction vector B2can be used to determine control points for the patch edge betweenvertex 2 and vertex 3.

At vertex 2, for the patch edge between vertex 2 and vertex 4, the labelindicates that surface normal vector N2 can be used to determine controlpoints. Using surface normal vector N2 provides accurate control pointsbecause the patch edge between vertex 2 and vertex 4 is an internaledge. Similarly, surface normal vector N2 can be used to determinecontrol points for the patch edge between vertex 2 and vertex 5.

At vertex 1, for the patch edge between vertex 1 and vertex 4, the labelindicates that edge direction vector C1 can be used to determine controlpoints. At vertex 1, for the patch edge between vertex 1 and vertex 2,the label indicates that edge direction vector B1 can be used todetermine control points.

Although the patches depicted in FIG. 2, FIG. 3A, and FIG. 3B aretriangular, patches can have varying numbers of vertices. Triangles areconventionally used but other polygons are possible.

FIG. 4A shows a cylinder 400. Although not shown, the cylinder 400 canbe represented by a quilt of patches. In some implementations, the facesof the cylinder 400 are represented by quilts of patches, and the wholecylinder is represented by a connected group of quilts. On the top face408 of the cylinder 400, a surface normal vector 404 is perpendicular tothe face 408 (that is, in the frame of reference of FIG. 4A, the surfacenormal vector 404 points directly “up” from the face 408.) Thus, for anyvertices of a quilt of patches located on the top face 408 of thecylinder 400, an associated surface normal vector would have the sameorientation relative to the face 408. On the side 409 of the cylinder400, a surface normal vector 406 points out from the surface 409, andthus is orthogonal to the surface normal vector 404 on top 408 of thecylinder 400. Thus, for any vertices of a quilt of patches located onthe side 409 of the cylinder 400, an associated surface normal vectorwould similarly point outward (that is, away from the side 409 of thecylinder). At the intersection of the side 409 of the cylinder and thetop 408 of the cylinder, an edge direction vector 406 points outwardfrom the surface of the side 409, and thus in the same direction as thesurface normal vector 408 on the side 409 of the cylinder 400.

FIG. 4B shows a portion 450 of a cylinder represented by a quilt ofpatches within an example graphical interface of a 3D modeling system.In some implementations, the quilt of patches includes two connectedquilts of patches, including one quilt that represents the top 452 ofthe cylinder and one quilt that represents the side 454 of the cylinder.There is an external edge where the side 454 of the cylinder intersectsthe top 452. At each location where a patch on the side 454 of thecylinder meets a patch on the top 452 of the cylinder, the two patcheshave a vertex in the same location. However, each vertex has a differentsurface normal vector associated with it. Vertices that are part ofpatches on the top 452 of the cylinder have surface normal vectors thatpoint “up” (shown in red, for example, surface normal vector 456) andvertices that are part of patches on the side 454 of the cylinder havesurface normal vectors that point outward (shown in green and red, forexample, surface normal vector 458). The vertices also have edgedirection vectors (shown in green and red, for example, edge directionvector 458) associated with them. In this case, the edge directionvectors point in the same direction as the surface normal vectors forvertices associated with patches on the side 454 of the cylinder.

FIG. 4C shows a representation of an example slanted cylinder 410. Asurface normal vector 414 on top 418 of the cylinder 410 points up, asit did for cylinder 400. Similarly, an edge direction vector 416 pointsoutward. However, a surface normal vector 412 on the side 419 of thecylinder points away from the side 419, and is not the same as the edgedirection vector 416.

FIG. 4D shows a portion 460 of a cylinder represented by a quilt ofpatches. The portion 460 shows a similar slanted cylinder to the slantedcylinder 410 and is depicted as a set of faces where each face isrepresented by a quilt of patches. Surface normal vectors are shown inred (for example, surface normal vector 466) and edge direction vectorsare shown in green (for example, edge direction vector 468).

When adding control points to the patches in a quilt of patches, surfacenormal vectors are typically used to determine the control points.However, when two patches share an external edge and thus have verticesat the same location, the surface normal vectors at that location can bedifferent. For example, in FIG. 4D, surface normal vectors (for example,surface normal vector 466) on the top 462 of the cylinder are notpointing in the same direction as surface normal vectors (for example,surface normal vector 470) on the side 464 of the cylinder. If thecontrol points are determined using the surface normal vectors, thecontrol points along the external edge will be different and a gap willform along the edge between the two patches.

One solution to fill a gap is to create a fillet. A fillet is a quilt ofpatches used to fill a gap in a quilt of patches. In someimplementations, a fillet is used to fill a gap between connected quiltsof patches. For example, where a Boundary Representation (B-rep) modelis faceted by generating a quilt of patches for each face in the model,a fillet can be used between connected quilts of patches where a gapappears between connected quilts.

FIG. 4E shows an example fillet between the side 482 of a slantedcylinder and the top 484 of the cylinder. The fillet causes the edgebetween the side 482 of the slanted cylinder and the top 484 to appearrounded. This rounded edge is undesirable, for example, in a CADapplication where a structure should appear exactly as it was designed.

FIG. 5A is a flow diagram of an example technique 500 of generating aquilt representation of a structure. Information is added to the quiltrepresentation so that it can be refined while preserving the appearanceof external edges in the structure. For purposes of illustration, thetechnique will be described in reference to a system (for example, adesktop graphics workstation with a central processing unit (CPU) and agraphics processing unit (GPU), or a web server communicating remotelywith a mobile device, or the like) that performs the technique.

The system generates a first quilt representation of a 3D structure(step 502). To generate the first quilt representation, the systemidentifies a model of a 3D structure (step 504). The structure can beany object, for example, a box, a cylinder, a hammer, an engine, or thelike. The model is typically a precise geometric model. In someimplementations, the model is a Boundary Representation (B-rep) model. AB-rep typically includes faces described by higher-order surfaces(splines, cylinders, spheres, cones, etc.) bounded by curves (lines,circles, splines) that trim the surface to the desired shape. The facesadjoin each other along their bounding curves. Various types of B-repmodels are possible, for example, winged edge B-rep models. In otherimplementations, the model is a Constructive Solid Geometry Model (CSG)model, a function representation (F-rep) model, a combination of models,or other type of model.

The system facets (or tessellates) the model, creating a plurality ofpatches (step 506). In some implementations, where the model is a B-repmodel, the system creates a quilt (having multiple patches) for eachface in the model. The faceting is performed by one or more firstprocessors. In some implementations, the one or more first processorscomprise a central processing unit (CPU).

The first quilt representation includes the plurality of patches. Thenumber of patches depends on a display level of detail. A display levelof detail specifies how detailed a quilt of patches needs to be (forexample, how many patches are needed, or what precision numbers areneeded) to appear appropriately at a certain zoom level. In someimplementations, a display level of detail specifies how detailed aquilt of patches needs to be to appear appropriately at a certain zoomlevel after it is refined. In some implementations, a user specifies thedesired display level of detail. In other implementations, the systemuses a default display level of detail or determines the level of detailbased on a user's view. The first quilt representation is associatedwith a first display level of detail.

The system adds information to the first quilt representation (step508). The information includes, for example, surface normal vectors,edge direction vectors, and the like.

To add information, the system identifies an external edge (510). Thesystem uses the model to identify the external edge. Various techniquesfor identifying external edges are possible. For example, the system canidentify a first patch in the plurality of patches. The first patchincludes a first plurality of vertices. A first vertex of the pluralityof vertices is on the identified external edge.

The system determines an edge direction vector for the identifiedexternal edge at a first vertex using the model (step 512). In someimplementations, the edge direction vector is normal to the direction ofcurvature of the identified external edge. In other implementations, anedge direction vector is tangent to the true edge curve at a vertex onthe boundary curve. In general, the edge direction vector is notdetermined using any other quilt or quilts that might adjoin the firstquilt. Therefore, the system can determine an edge direction vector evenif the first quilt stands alone (for example, if the first quiltrepresents a surface that is not part of a solid). Furthermore, thesystem can determine an edge direction vector even if another quiltadjoining the first quilt is tangent to the first quilt along theircommon boundary; in that case, the surface normal vectors of the twoquilts along the boundary are parallel, and thus do not give anyinformation about the boundary direction. The system associates the edgedirection vector with the first vertex (step 514).

Although the flow diagram illustrates determining an edge directionvector for only the first vertex, the system typically also performs thetechnique using most or all other vertices on the external edge. Thesystem also optionally performs the technique using most or all otherexternal edges in the model.

In some implementations, the system identifies vertices that are theendpoints of an external edge, and associates edge direction vectorswith those vertices. In those implementations, the system optionallyassociates edge direction vectors with vertices between the endpoints onthe external edge. Alternatively, the system determines approximationsof the edge direction vectors at vertices between the endpoints bydetermining a linear combination of the adjacent patch edges. In someimplementations, the system determines the linear combination byweighting shorter edges more heavily than longer edges because shorteredges more closely approximate the true direction of the edge in theirvicinity. For example, the system can weight the linear combinationbased on the length of each edge.

In some implementations, the system adds surface normal information. Thesystem identifies a second patch in the patches. The second patchincludes second vertices. The second vertices include a second vertex.The system determines a surface normal vector for the second vertexusing the model (step 516). The system associates the surface normalvector with the second vertex (step 518).

Although the flow diagram illustrates determining a surface normalvector for only the second vertex, the system typically also performsthe technique using other vertices. For example, meshes of trianglesused with N-patch technology include surface normal vectors at everypoint in the mesh. In some implementations, the system associatessurface normal vectors with all vertices on internal edges. In otherimplementations, the system associates surface normal vectors with allvertices, whether they are on internal edges or external edges. In thoseimplementations, vertices on external edges can have both surface normalvectors and edge direction vectors associated with them.

In some implementations, the system compresses information that itassociates with the first quilt of patches. For example, the system cancompress the surface normal vectors and the edge direction vectors.Various compression techniques are possible.

The system optionally displays the structure using the first quilt ofpatches. The system generates a first mesh of triangles based on thefirst quilt representation (step 520). In some situations, the firstmesh of triangles is equivalent to the first quilt representation. Inother situations, for example where the patches are higher orderpolygons or have associated control points, the system facets the quiltto generate the first mesh of triangles. In some implementations,generating the mesh representation is performed by one or more secondprocessors. For example, the one or more second processors can comprisea graphics processing unit (GPU).

The system displays the first mesh of triangles at a first zoom level(step 522). For example, if the system includes or is attached to amonitor, the system displays the first mesh of triangles on the monitor.In another example, the system sends the first mesh of triangles toanother system for display, or the system sends a two dimensional imageof the first mesh of triangles for display.

FIG. 5B is a flow diagram of an example technique 550 for refining thefirst quilt representation (or any quilt representation generated bytechnique 500 or by other techniques) for a higher display level ofdetail while preserving the appearance of external edges in thestructure. For purposes of illustration, the technique will be describedin reference to a system (for example, a desktop graphics workstationwith a central processing unit (CPU) and a graphics processing unit(GPU), or a web server communicating remotely with a mobile device, orthe like) that performs the technique.

The system optionally receives a request for a display of the structureat a second level of detail (step 551). The second level of detail ishigher than the first level of detail. In some implementations, thesystem receives a request from a user. For example, the user can zoom inon the structure. In other implementations, the system receives arequest from another process, for example, a scripting engine or arequest to render a view for printing or saving to an image file athigher precision than is used for display.

The system generates a second quilt representation (step 552). Thesecond quilt representation is a refinement of the first quiltrepresentation. In some scenarios, the second quilt representation doesnot show the entire structure. In those scenarios, the system optionallydoes not generate control points and patches for areas of the structurethat do not need to be shown.

To generate the second quilt representation, the system determines oneor more first control points for the first patch based on the firstvertex and the associated edge direction vector (step 554). Varioustechniques for determining the one or more first control points arepossible. In some implementations, where the edge direction vector isnormal to the direction of curvature of the identified external edge atthe first vertex, the techniques used to generate control points forN-patches can be used but with the edge direction vector substituted forthe surface normal vector. Although the technique is illustrated asdetermining control points for only the first vertex, the systemtypically determines control points for other vertices.

The system associates the one or more first control points with thefirst quilt representation (step 556). In some implementations, thesystem keeps the first quilt representation and associates the one ormore first control points with a copy. The system can generate otherquilt representations from the first quilt representation when needed(for example, when a user zooms to a different display level of detail)and delete them when no longer needed.

In some implementations, where the system associated a surface normalvector with a second vertex, the system determines one or more secondcontrol points for the second patch based on the second vertex and theassociated surface normal vector (step 558). The system associates theone or more second control points with the first quilt representation ora copy (step 560).

The system optionally displays the structure using the second quilt ofpatches. The system generates a second mesh of triangles based on thesecond quilt representation (step 562). Because the second quilt ofpatches has associated control points, the system facets the quilt togenerate the second mesh of triangles.

In some implementations, generating the second mesh representation isperformed by one or more second processors. For example, the one or moresecond processors can comprise a graphics processing unit (GPU). Invarious implementations, determining the one or more first controlpoints is also performed by the one or more second processors.

The system displays the second mesh of triangles at a second zoom level(step 564).

FIG. 6 shows a first torus 600 and a second torus 602 based on the firsttorus 600. The first torus 600 is smooth. The second torus 602 isgenerated using a quilt of patches based on a coarse sampling of thefirst torus 600 and shown at the same size as the first torus 600. Thesecond torus 602 was created using N-patch techniques; that is, thepatches in the second torus 602 are based on patches in the first torus600 and associated normal vectors.

The second torus 602 correctly represents the first torus 600 along theequatorial regions of the torus 602 (that is, at the very outer edges).The surface normal vectors (not shown) along the equatorial regions allpoint radially outward, and therefore it is possible to determine thecurvature of the surface based on the surface normal vectors.

The second torus 602 incorrectly represents the first torus 600 alongthe ridge regions (that is, at the top of the torus). The surface normalvectors along the ridge regions are all parallel to the axis of thetorus (that is, they all point up) and thus parallel to each other.Therefore, the surface normal vectors do not indicate the curvature ofthe ridge regions. Consequently, refinement of a quilt of patchesrepresenting a torus using normal vectors results in inaccurate(relative to a precise model of the torus) refined patches.

FIG. 7 shows a torus 700 represented by a quilt of patches. The darkblue lines (for example, 702) represent the edges of the patches thatrepresent the torus. The black line 704 on top of the torus indicatesthe ridge region of the torus.

Vertices of patches are specified by their Cartesian coordinates.Additionally, some vertices are specified by their texture coordinates.Texture coordinates are commonly associated with vertices to supporttexture-image based coloration to the surface. Various techniques fordetermining texture coordinates are possible. For example, one method isto derive texture coordinates from the underlying parameter space of theprecise model surface. The coordinates may be scaled to make texturespace more isotropic (square), which makes textures look more natural.In general, the orientation and general layout of the UV coordinates isbased directly on the surface parameter space, and not on an arbitraryscheme for generating texture coordinates.

In some implementations, texture coordinates include a U positioncoordinate in UV space and a V position coordinate in UV space. UV spaceidentifies lines of latitude and longitude of the torus. The light greylines (for example, 706) in FIG. 7 show a grid illustrating UV space. AU position coordinate and a V position coordinate can specify any pointon the surface of the torus.

Some vertices are associated with cross-curvature direction data.Cross-curvature direction data is commonly associated with meshes oftriangles to support bump-mapped textures. Cross-curvature directiondata for a vertex in a patch indicates the directions of the UVparameter space at that vertex. For example, cross-curvature directiondata can include a U direction vector indicating the U direction of theUV parameter space and a V direction vector indicating the V directionof the UV parameter space. In some implementations, cross-curvaturedirection data includes scalar data giving the relative scale or aspectratio of parameter space in the U and V directions. In someimplementations, cross-curvature data includes a U direction tangentvector giving the direction tangent to the surface in the U directionand a V direction tangent vector giving the direction tangent to thesurface in the V direction. Various techniques for determiningcross-curvature direction data are possible.

As shown in FIG. 7, surface normal vectors (for example, 708 and 710)are shown in yellow. Cross-curvature direction data, as U directiontangent vectors and V direction tangent vectors (for example, 712 and714), are also shown in yellow.

FIG. 8A is a flow diagram of an example technique 800 of generating aquilt representation of a structure. Information is added to the quiltrepresentation so that it can be refined while preserving the appearanceof surfaces with cross-curvature components in the structure. Forpurposes of illustration, the technique will be described in referenceto a system (for example, a desktop graphics workstation with a centralprocessing unit (CPU) and a graphics processing unit (GPU), or a webserver communicating remotely with a mobile device, or the like) thatperforms the technique.

The system generates a first quilt representation of a 3D structure(step 802). To generate the first quilt representation, the systemidentifies a model of a 3D structure (step 804). The structure can beany object, for example, a box, a cylinder, a hammer, an engine, or thelike. The model is typically a precise geometric model. In someimplementations, the model is a Boundary Representation (B-rep) model. AB-rep typically consists of faces described by higher-order surfaces(splines, cylinders, spheres, cones, etc.) bounded by curves (lines,circles, splines) that trim the surface to the desired shape. The facesadjoin each other along their bounding curves. Various types of B-repmodels are possible, for example, winged edge B-rep models. In otherimplementations, the model is a Constructive Solid Geometry Model (CSG)model, a function representation (F-rep) model, a combination of models,or other type of model.

The system facets (or tessellates) the model, creating multiple patches(step 806). In some implementations, where the model is a B-rep model,the system creates a quilt (comprising a plurality of patches) for eachface in the model. The faceting is performed by one or more firstprocessors. In some implementations, the one or more first processorscomprise a central processing unit (CPU).

The first quilt representation includes the patches. The number ofpatches depends on a desired display level of detail. In someimplementations, a user specifies the desired display level of detail.In other implementations, the system uses a default display level ofdetail or determines the level of detail based on what a user is lookingat. The first quilt representation is associated with a first displaylevel of detail.

The system adds information to the first quilt representation (step808). The information includes, for example, surface normal vectors,texture coordinate data, cross-curvature direction data, and the like.

To add information, the system identifies a surface on the structureincluding cross-curvature components (step 810). The system uses themodel to identify the surface. Various techniques for identifyingsurfaces with cross-curvature components are possible. In general, asurface with cross-curvature components is a surface with curvature in adirection tangent to the surface. For example, the structure or thesurface can be a torus, a toroid, a toroidal fillet, a helicalstructure, a helical coil, or the like. Additionally, a surface withcross-curvature components is one in which connected regions with thesame surface normal do not lie along straight lines. For example, alongthe surface of a cone or cylinder, regions with the same surface normaldirection lie along straight lines. In contrast, on a torus, regions ofconstant normal direction (along the “ridges”) lie along circles.

The system identifies a first patch of the patches. The first patchincludes first vertices. A first vertex of the vertices is on theidentified surface.

The system determines texture coordinate data and cross-curvature datafor the first vertex (step 812). In some implementations, the texturecoordinate data includes UV parameter information comprising a Udirection coordinate and a V direction coordinate.

In some implementations, the cross-curvature direction data includes a Udirection tangent vector giving the direction tangent to the surface inthe U direction and a V direction tangent vector giving the directiontangent to the surface in the V direction. In general, the U directiontangent vector and the V direction tangent vector are not both of unitlength. Their relative lengths (in other words, the aspect ratio of UVspace) typically vary across the surface. For example, as you go downinto the “hole” of a torus, the length of a unit of latitude remainsconstant, but the length of a unit of longitude gets shorter, so theaspect ratio of a unit of UV space becomes more and more rectangular.

In some cases, where the system associates a surface normal vector withthe first vertex and the U direction tangent vector is orthogonal to theV direction tangent vector, the system optionally only stores the Udirection tangent vector (for instance, to save memory). In those cases,the system can determine the V direction tangent vector by determiningthe cross product of the surface normal vector with the U directiontangent vector. However, in such cases to the system can additionallydetermine the aspect ratio or relative lengths of the U directiontangent vector and the V direction tangent vector and associate thataspect ratio with first vertex. The U direction tangent vector and the Vdirection tangent vector are typically not of equal length and thisratio is needed to correctly construct the required tangent directionsin Cartesian space.

Whether the U direction tangent vector is orthogonal to the V directiontangent vector depends on the surface. For example, on a typical torusthe U direction tangent vector is orthogonal to the V direction tangentvector at all vertices, whereas on a coil, the U direction tangentvector is typically not orthogonal to the V direction tangent vector atmany or any vertices. Thus, for vertices on the surface of a coil, thesystem typically associates both a U direction tangent vector and a Vdirection tangent vector with the vertices.

The system associates the texture coordinate data and thecross-curvature direction data with the first vertex (step 814).

Although the flow diagram illustrates determining texture coordinatedata and cross-curvature direction data for only the first vertex, thesystem typically also performs the technique using most or all othervertices on the surface. The system also optionally performs thetechnique using other surfaces in the model.

In some implementations, the system adds surface normal information. Thesystem identifies a second patch in the patches. The second patchincludes second vertices. The second vertices include a second vertex.The system determines a surface normal vector for the second vertexusing the model (step 816). The system associates the surface normalvector with the second vertex (step 818).

Although the flow diagram illustrates determining a surface normalvector for only the second vertex, the system typically also performsthe technique using other vertices. For example, meshes of trianglesused with N-patch technology include surface normal vectors at everypoint in the mesh. In some implementations, the system associatessurface normal vectors with all vertices on internal edges. In otherimplementations, the system associates surface normal vectors with allvertices, whether they are on internal edges or external edges. In thoseimplementations, vertices on external edges can have both surface normalvectors and edge direction vectors associated with them.

In some implementations, the system compresses information that itassociates with the first quilt of patches. For example, the system cancompress the surface normal vectors, the texture coordinate data, andthe cross-curvature direction data. Various compression techniques arepossible.

The system optionally displays the structure using the first quilt ofpatches. The system generates a first mesh of triangles based on thefirst quilt representation (step 820). In some situations, the firstmesh of triangles is equivalent to the first quilt representation. Inother situations, for example where the patches are higher orderpolygons or have associated control points, the system facets the quiltto generate the first mesh of triangles. In some implementations,generating the mesh representation is performed by one or more secondprocessors. For example, the one or more second processors can comprisea graphics processing unit (GPU).

The system displays the first mesh of triangles at a first zoom level(step 822). For example, if the system includes, or is attached to, amonitor, the system displays the first mesh of triangles on the monitor.In another example, the system sends the first mesh of triangles toanother system for display, or the system sends a two dimensional imageof the first mesh of triangles for display.

FIG. 8B is a flow diagram of an example technique 850 for refining thefirst quilt representation (or any quilt representation generated bytechnique 800 or by other techniques) for a higher display level ofdetail while preserving the appearance of surfaces with cross-curvaturecomponents in the structure. For purposes of illustration, the techniquewill be described in reference to a system (for example, a desktopgraphics workstation with a central processing unit (CPU) and a graphicsprocessing unit (GPU), or a web server communicating remotely with amobile device, or the like) that performs the technique.

The system optionally receives a request for a display of the structureat a second level of detail (step 851). The second level of detail ishigher than the first level of detail. In some implementations, thesystem receives a request from a user. For example, the user can zoom inon the structure. In other implementations, the system receives arequest from another process, for example, a scripting engine or arequest to render a view for printing or saving to an image file athigher precision than is used for display.

The system generates a second quilt representation (step 852). Thesecond quilt representation is a refinement of the first quiltrepresentation. In some scenarios, the second quilt representation doesnot show the entire structure. In those scenarios, the system optionallydoes not generate control points and patches for areas of the structurethat do not need to be shown.

To generate the second quilt representation, the system determines atangent vector for the first vertex (step 854). The tangent vector isbased on the associated texture coordinate data and the associatedcross-curvature data.

In some implementations, determining a tangent vector for the firstvertex includes determining a difference vector comprising thedifference in UV parameter space between the first vertex and a secondvertex at the other end of a patch edge associated with the firstvertex. In these implementations, the tangent vector is used todetermine control points at the first vertex for the patch edge betweenthe first vertex and the second vertex. The system determines the linearcombination of a U direction tangent vector and a V direction tangentvector at the first vertex. Because the U direction tangent vector andthe V direction tangent vector are tangent to the surface at the firstvertex, a linear combination of those vectors is tangent to the surfaceat the first vertex.

The system weights the determined linear combination using thedifference vector. The weighting factors are the differences in U and Vcoordinates from the first vertex to the second, that is, the“direction” in UV space from the first vertex to the second. The systemdetermines that the tangent vector is the weighted linear combination.

The system optionally determines an additional tangent vector for thesecond vertex. The additional tangent vector is based on the directionfrom the second vertex to the first vertex, that is, an additionaldifference vector comprising the difference in UV parameter spacebetween the second vertex and the first vertex. The system uses theadditional tangent vector to determine control points for the secondvertex along the patch edge between the second vertex and the firstvertex.

The system determines one or more first control points for the firstpatch based on the first vertex and the determined tangent vector (step856). Various techniques for determining the one or more first controlpoints are possible. In some implementations, the system determines theone or more first control points using techniques similar to those usedfor N-patches, but substitutes the determined tangent vector for atangent vector derived from surface normal vectors. For example, someN-patch techniques derive a tangent vector based on surface normalvectors and then determine control points based on that tangent vector.Instead, the system determines the tangent vector as described above,and then determines control points based on that tangent vector.Although the technique is illustrated as determining control points foronly the first vertex, the system typically determines control pointsfor other vertices.

The system associates the one or more first control points with thefirst quilt representation (step 858). In some implementations, thesystem keeps the first quilt representation and associates the one ormore first control points with a copy. The system can generate otherquilt representations from the first quilt representation when needed(for example, when a user zooms to a different display level of detail)and delete them when no longer needed.

In some implementations, where the system associated a surface normalvector with a second vertex, the system determines one or more secondcontrol points for the second patch based on the second vertex and theassociated surface normal vector (step 860). The system associates theone or more second control points with the first quilt representation ora copy (step 862).

The system optionally displays the structure using the second quilt ofpatches. The system generates a second mesh of triangles based on thesecond quilt representation (step 864). Because the second quilt ofpatches has associated control points, the system facets the quilt togenerate the second mesh of triangles.

In some implementations, generating the second mesh representation isperformed by one or more second processors. For example, the one or moresecond processors can comprise a graphics processing unit (GPU). Invarious implementations, determining the one or more first controlpoints is also performed by the one or more second processors.

The system displays the second mesh of triangles at a second zoom level(step 866).

FIG. 9 shows three views of an example half-section torus raised from aplanar face. The first view 900 shows the structure (the half-sectiontorus raised from a planar face) represented by a first quilt ofpatches. The second view 902 shows the structure represented by a secondquilt of patches. The second quilt of patches is a refined quilt basedon the first quilt of patches, including surface normal vectors but nottexture coordinate data and cross-curvature direction data. The thirdview 904 shows the structure represented by a third quilt of patches.The third quilt of patches is a refined quilt based on the first quiltof patches, including surface normal vectors, texture coordinate data,and cross-curvature data. For example, the techniques 800 and 850illustrated in FIGS. 8A and 8B can be used to generate the third quiltof patches. The third quilt of patches represents a smooth torus whereasthe second quilt of patches represents a blocky torus.

FIG. 10 is a schematic diagram of a generic computer system 1000. Thesystem 1000 can be used for practicing operations described inassociation with the techniques 500, 550, 800, and 850. The system 1000can include a processor 1010, a memory 1020, a storage device 1030, andinput/output devices 1040. Each of the components 1010, 1020, 1030, and1040 are interconnected using a system bus 1050. The processor 1010 iscapable of processing instructions for execution within the system 1000.In some implementations, the processor 1010 is a single-threadedprocessor. In other implementations, the processor 1010 is amulti-threaded processor. In various implementations, the system 1010includes one or more first processors (for example, comprising a centralprocessing unit (CPU)) and one or more second processors (for example,comprising a graphics processing unit (GPU)). The processor 1010 iscapable of processing instructions stored in the memory 1020 or on thestorage device 1030 to display graphical information for a userinterface on the input/output device 1040.

The memory 1020 is a computer readable medium such as volatile or nonvolatile that stores information within the system 1000. The memory 1020can store data structures representing three dimensional models. Thestorage device 1030 is capable of providing persistent storage for thesystem 1000. The storage device 1030 may be a floppy disk device, a harddisk device, an optical disk device, or a tape device, or other suitablepersistent storage means. The input/output device 1040 providesinput/output operations for the system 1000. In one implementation, theinput/output device 1040 includes a keyboard and/or pointing device. Inanother implementation, the input/output device 1040 includes a displayunit for displaying graphical user interfaces.

The input/output device 1040 can provide input/output operations for aCAD system. The CAD system can be, for example, Autodesk Inventor,available from Autodesk, Inc., of San Rafael, Calif., or another CADapplication or other software application.

Various implementations of the systems and techniques described here canbe realized in digital electronic circuitry, integrated circuitry,specially designed ASICs (application specific integrated circuits),computer hardware, firmware, software, and/or combinations thereof.These various implementations can include implementation in one or morecomputer programs that are executable and/or interpretable on aprogrammable system including at least one programmable processor, whichmay be special or general purpose, coupled to receive data andinstructions from, and to transmit data and instructions to, a storagesystem, at least one input device, and at least one output device.

These computer programs (also known as programs, software, softwareapplications or code) include machine instructions for a programmableprocessor, and can be implemented in a high-level procedural and/orobject-oriented programming language, and/or in assembly/machinelanguage. As used herein, the terms “machine-readable medium” and“computer-readable medium” refer to any computer program product,apparatus and/or device (e.g., magnetic discs, optical disks, memory,Programmable Logic Devices (PLDs)) used to provide machine instructionsand/or data to a programmable processor, including a machine-readablemedium that receives machine instructions as a machine-readable signal.The term “machine-readable signal” refers to any signal used to providemachine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniquesdescribed here can be implemented on a computer having a display device(e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor)for displaying information to the user and a keyboard and a pointingdevice (e.g., a mouse or a trackball) by which the user can provideinput to the computer. Other kinds of devices can be used to provide forinteraction with a user as well; for example, feedback provided to theuser can be any form of sensory feedback (e.g., visual feedback,auditory feedback, or tactile feedback); and input from the user can bereceived in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in acomputing system that includes a back end component (e.g., as a dataserver), or that includes a middleware component (e.g., an applicationserver), or that includes a front end component (e.g., a client computerhaving a graphical user interface or a Web browser through which a usercan interact with an implementation of the systems and techniquesdescribed here), or any combination of such back end, middleware, orfront end components. The components of the system can be interconnectedby any form or medium of digital data communication (e.g., acommunication network). Examples of communication networks include alocal area network (“LAN”), a wide area network (“WAN”), and theInternet.

While this specification contains many implementation details, theseshould not be construed as limitations on the scope of the invention orof what may be claimed, but rather as descriptions of features specificto particular implementations of the invention. Certain features thatare described in this specification in the context of separateimplementations can also be implemented in combination in a singleimplementation. Conversely, various features that are described in thecontext of a single implementation can also be implemented in multipleimplementations separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular implementations of the invention have been described.Other implementations are within the scope of the following claims. Forexample, the actions recited in the claims can be performed in adifferent order and still achieve desirable results.

1. A method for generating a quilt representation of a three-dimensionalstructure, the method comprising: generating a first quiltrepresentation of a three-dimensional structure, including: identifyinga model of the three-dimensional structure, the model representing thethree-dimensional structure by a solid representation scheme, where: themodel of the three-dimensional structure is one of: a boundaryrepresentation (B-rep) model, a function representation (F-rep) model,or a constructive solid geometry model (CSG); and faceting the model andgenerating the first quilt representation, the first quiltrepresentation including representing the three-dimensional structure bya plurality of patches, the first quilt representation being associatedwith a first display level of detail, where the faceting is performed byone or more first processors; adding information to the first quiltrepresentation, including: identifying an external edge of thethree-dimensional structure based on the model, identifying a firstpatch in the plurality of patches, the first patch including a firstplurality of vertices, and a first vertex of the first plurality ofvertices being on the identified external edge, determining an edgedirection vector for the identified external edge at the first vertexbased on the model; and generating a second quilt representation basedon the first quilt representation, including: determining one or morefirst control points for the first patch based on the first vertex andthe associated edge direction vector, and associating the one or morefirst control points with the first quilt representation to generate thesecond quilt representation, the second quilt representation beingassociated with a second display level of detail, the second displaylevel of detail being higher than the first display level of detail. 2.The method of claim 1 where: adding information to the first quiltrepresentation further includes: identifying a second patch in theplurality of patches, the second patch including a second plurality ofvertices, a second vertex being in the second plurality of vertices,determining a normal vector for the second patch using the model, thenormal vector being normal to the surface of the three-dimensionalstructure at the second vertex, and associating the normal vector withthe second vertex; and generating a second quilt representation based onthe first quilt representation further includes: determining one or moresecond control points for the second patch based on the second vertexand the associated normal vector, and faceting the first quiltrepresentation using the one or more second control points.
 3. Themethod of claim 1 where: generating the second quilt representation isperformed in response to a request for the second display level ofdetail.
 4. The method of claim 1 where: the edge direction vector isnormal or tangent to the direction of curvature of the identifiedexternal edge at the first vertex.
 5. The method of claim 1, furthercomprising: generating a mesh representation of the 3-D dimensionalstructure, including faceting the second quilt representation using theone or more control points, the mesh representation including aplurality of triangles.
 6. The method of claim 5, where: the one or morefirst processors comprise a central processing unit (CPU); generatingthe mesh representation is performed by one or more second processors,where the one or more second processors comprise a graphics processingunit (GPU).
 7. The method of claim 6, where: determining the one or morefirst control points is performed by the CPU.
 8. The method of claim 6,where: determining the one or more first control points is performed bythe GPU.
 9. A computer program product, encoded on a non-transitorycomputer-readable storage device, operable to cause data processingapparatus to perform operations for generating a quilt representation ofa three-dimensional structure, the operations comprising: generating afirst quilt representation of a three-dimensional structure, including:identifying a model of the three-dimensional structure, the modelrepresenting the three-dimensional structure by a solid representationscheme, where: the model of the three-dimensional structure is one of: aboundary representation (B-rep) model, a function representation (F-rep)model, or a constructive solid geometry model (CSG); and faceting themodel and generating the first quilt representation, the first quiltrepresentation representing the three-dimensional structure by aplurality of patches, the first quilt representation being associatedwith a first display level of detail, where the faceting is performed byone or more first processors; adding information to the first quiltrepresentation, including: identifying an external edge of thethree-dimensional structure based on the model, identifying a firstpatch in the plurality of patches, the first patch including a firstplurality of vertices, and a first vertex of the first plurality ofvertices being on the identified external edge, determining an edgedirection vector for the identified external edge at the first vertexbased on the model; and generating a second quilt representation basedon the first quilt representation, including: determining one or morefirst control points for the first patch based on the first vertex andthe associated edge direction vector, and associating the one or morefirst control points with the first quilt representation to generate thesecond quilt representation, the second quilt representation beingassociated with a second display level of detail, the second displaylevel of detail being higher than the first display level of detail. 10.The computer program product of claim 9 where: adding information to thefirst quilt representation further includes: identifying a second patchin the plurality of patches, the second patch including a secondplurality of vertices, a second vertex being in the second plurality ofvertices, determining a normal vector for the second patch using themodel, the normal vector being normal to the surface of thethree-dimensional structure at the second vertex, and associating thenormal vector with the second vertex; and generating a second quiltrepresentation based on the first quilt representation further includes:determining one or more second control points for the second patch basedon the second vertex and the associated normal vector, and faceting thefirst quilt representation using the one or more second control points.11. The computer program product of claim 9 where: generating the secondquilt representation is performed in response to a request for thesecond display level of detail.
 12. The computer program product ofclaim 9 where: the edge direction vector is normal or tangent to thedirection of curvature of the identified external edge at the firstvertex.
 13. The computer program product of claim 9, where theoperations further comprise: generating a mesh representation of the 3-Ddimensional structure, including faceting the second quiltrepresentation using the one or more control points, the meshrepresentation including a plurality of triangles.
 14. The computerprogram product of claim 13, where: the one or more first processorscomprise a central processing unit (CPU); generating the meshrepresentation is performed by one or more second processors, where theone or more second processors comprise a graphics processing unit (GPU).15. The computer program product of claim 14, where: determining the oneor more first control points is performed by the CPU.
 16. The computerprogram product of claim 14, where: determining the one or more firstcontrol points is performed by the GPU.
 17. A system comprising: acomputer-readable medium comprising a program product; a display device;and one or more first processors operable to interact with the displaydevice and to execute the program product and perform operations forgenerating a quilt representation of a three-dimensional structure, theoperations comprising: generating a first quilt representation of athree-dimensional structure, including: identifying a model of thethree-dimensional structure, the model representing thethree-dimensional structure by a solid representation scheme, where: themodel of the three-dimensional structure is one of: a boundaryrepresentation (B-rep) model, a function representation (F-rep) model,or a constructive solid geometry model (CSG); and faceting the model andgenerating the first quilt representation, the first quiltrepresentation representing the three-dimensional structure by aplurality of patches, the first quilt representation being associatedwith a first display level of detail, where the faceting is performed bythe one or more first processors; adding information to the first quiltrepresentation, including: identifying an external edge of thethree-dimensional structure based on the model, identifying a firstpatch in the plurality of patches, the first patch including a firstplurality of vertices, and a first vertex of the first plurality ofvertices being on the identified external edge, determining an edgedirection vector for the identified external edge at the first vertexbased on the model; and generating a second quilt representation basedon the first quilt representation, including: determining one or morefirst control points for the first patch based on the first vertex andthe associated edge direction vector, and associating the one or morefirst control points with the first quilt representation to generate thesecond quilt representation, the second quilt representation beingassociated with a second display level of detail, the second displaylevel of detail being higher than the first display level of detail. 18.The system of claim 17 where: adding information to the first quiltrepresentation further includes: identifying a second patch in theplurality of patches, the second patch including a second plurality ofvertices, a second vertex being in the second plurality of vertices,determining a normal vector for the second patch using the model, thenormal vector being normal to the surface of the three-dimensionalstructure at the second vertex, and associating the normal vector withthe second vertex; and generating a second quilt representation based onthe first quilt representation further includes: determining one or moresecond control points for the second patch based on the second vertexand the associated normal vector, and faceting the first quiltrepresentation using the one or more second control points.
 19. Thesystem of claim 17 where: generating the second quilt representation isperformed in response to a request for the second display level ofdetail.
 20. The system of claim 17 where: the edge direction vector isnormal or tangent to the direction of curvature of the identifiedexternal edge at the first vertex.
 21. The system of claim 17 where theoperations further comprise: generating a mesh representation of the 3-Ddimensional structure, including faceting the second quiltrepresentation using the one or more control points, the meshrepresentation including a plurality of triangles.
 22. The system ofclaim 21, where: the one or more first processors comprise a centralprocessing unit (CPU); generating the mesh representation is performedby one or more second processors, where the one or more secondprocessors comprise a graphics processing unit (GPU).
 23. The system ofclaim 22, where: determining the one or more first control points isperformed by the CPU.
 24. The system of claim 22, where: determining theone or more first control points is performed by the GPU.
 25. A methodfor generating a quilt representation of a three-dimensional structure,the model comprising: generating a first quilt representation of athree-dimensional structure, including: identifying a model of thethree-dimensional structure, the model representing thethree-dimensional structure by a solid representation scheme, where: themodel of the three-dimensional structure is one of: a boundaryrepresentation (B-rep) model, a function representation (F-rep) model,or a constructive solid geometry model (CSG), and faceting the model andgenerating the first quilt representation, the first quiltrepresentation representing the three-dimensional structure by aplurality of patches, the quilt representation being associated with afirst display level of detail, where the faceting is performed by one ormore first processors; adding information to the first quiltrepresentation, including: identifying a surface on thethree-dimensional structure in the model, the surface includingcross-curvature components, identifying a first patch in the pluralityof patches, the first patch including a first plurality of vertices, anda first vertex of the first plurality of vertices being on theidentified surface, using the model, determining texture coordinate datafor the first vertex and associating the texture coordinate data withthe first vertex, using the model, determining cross-curvature directiondata for the first vertex and associating the cross-curvature directiondata with the first vertex; and generating a second quilt representationbased on the first quilt representation, including: determining atangent vector for the first vertex based on the associated texturecoordinate data and the associated cross-curvature direction data,determining one or more first control points for the first patch basedon the first vertex and the tangent vector; and associating the one ormore first control points with the first quilt representation togenerate the second quilt representation, the second quiltrepresentation being associated with a second display level of detail.26. The method of claim 25 where: adding information to the first quiltrepresentation further includes: identifying a second patch in theplurality of patches, the second patch including a second plurality ofvertices, a second vertex being in the second plurality of vertices;determining a normal vector for the second patch using the model, thenormal vector being normal to the surface of the three-dimensionalstructure at the second vertex; and associating the normal vector withthe second vertex; and generating a second quilt representation based onthe first quilt representation further includes: determining one or moresecond control points for the second patch based on the second vertexand the associated normal vector; and faceting the first quiltrepresentation using the one or more second control points.
 27. Themethod of claim 25 where: generating the second quilt representation isperformed in response to a request for the second display level ofdetail.
 28. The method of claim 25 where: the structure is one of: atorus, a toroid, a toroidal fillet, a helical structure, a helical coil,or another structure including a surface with curvature in directionstangent to the surface.
 29. The method of claim 25, further comprising:generating a mesh representation of the 3-D dimensional structure,including faceting the second quilt representation using the one or morecontrol points, the mesh representation including a plurality oftriangles.
 30. The method of claim 29, where: the one or more firstprocessors comprise a central processing unit (CPU); generating the meshrepresentation is performed by one or more second processors, where theone or more second processors comprise a graphics processing unit (GPU).31. The method of claim 30, where: determining the one or more firstcontrol points is performed by the GPU.
 32. The method of claim 25where: texture coordinate data includes UV parameter informationcomprising a U direction coordinate and a V direction coordinate, andwhere the texture coordinate data is based on the parameter space of themodel; and cross-curvature direction data includes a U direction tangentvector giving the direction tangent to the surface in the U directionand a V direction tangent vector giving the direction tangent to thesurface in the V direction, and scalar data giving the aspect ratio ofparameter space in the U and V directions.
 33. The method of claim 32where determining a tangent vector based on the associated texturecoordinate data and the associated cross-curvature direction dataincludes: determining a difference vector comprising the difference inUV parameter space between the texture coordinates at the first vertexand the texture coordinates at a second vertex at the other end of apatch edge associated with the first vertex; and determining the linearcombination of a U direction tangent vector and a V direction tangentvector at the first vertex and weighting the determined linearcombination using the difference vector; and determining the tangentvector based on the weighted linear combination.
 34. A computer programproduct, encoded on a non-transitory computer-readable storage device,operable to cause data processing apparatus to perform operations forgenerating a quilt representation of a three-dimensional structure, theoperations comprising: generating a first quilt representation of athree-dimensional structure, including: identifying a model of thethree-dimensional structure, the model representing thethree-dimensional structure by a solid representation scheme, where: themodel of the three-dimensional structure is one of: a boundaryrepresentation (B-rep) model, a function representation (F-rep) model,or a constructive solid geometry model (CSG), and faceting the model andgenerating the first quilt representation, the first quiltrepresentation representing the three-dimensional structure by aplurality of patches, the quilt representation being associated with afirst display level of detail, where the faceting is performed by one ormore first processors; adding information to the first quiltrepresentation, including: identifying a surface on thethree-dimensional structure in the model, the surface includingcross-curvature components, identifying a first patch in the pluralityof patches, the first patch including a first plurality of vertices, anda first vertex of the first plurality of vertices being on theidentified surface, using the model, determining texture coordinate datafor the first vertex and associating the texture coordinate data withthe first vertex, using the model, determining cross-curvature directiondata for the first vertex and associating the cross-curvature directiondata with the first vertex; and generating a second quilt representationbased on the first quilt representation, including: determining atangent vector for the first vertex based on the associated texturecoordinate data and the associated cross-curvature direction data,determining one or more first control points for the first patch basedon the first vertex and the tangent vector; and associating the one ormore first control points with the first quilt representation togenerate the second quilt representation, the second quiltrepresentation being associated with a second display level of detail.35. The computer program product of claim 34 where: adding informationto the first quilt representation further includes: identifying a secondpatch in the plurality of patches, the second patch including a secondplurality of vertices, a second vertex being in the second plurality ofvertices; determining a normal vector for the second patch using themodel, the normal vector being normal to the surface of thethree-dimensional structure at the second vertex; and associating thenormal vector with the second vertex; and generating a second quiltrepresentation based on the first quilt representation further includes:determining one or more second control points for the second patch basedon the second vertex and the associated normal vector; and faceting thefirst quilt representation using the one or more second control points.36. The computer program product of claim 34 where: generating thesecond quilt representation is performed in response to a request forthe second display level of detail.
 37. The computer program product ofclaim 34 where: the structure is one of: a torus, a toroid, a toroidalfillet, a helical structure, a helical coil, or another structureincluding a surface with curvature in directions tangent to the surface.38. The computer program product of claim 34, where the operationsfurther comprise: generating a mesh representation of the 3-Ddimensional structure, including faceting the second quiltrepresentation using the one or more control points, the meshrepresentation including a plurality of triangles.
 39. The computerprogram product of claim 34, where: the one or more first processorscomprise a central processing unit (CPU); generating the meshrepresentation is performed by one or more second processors, where theone or more second processors comprise a graphics processing unit (GPU).40. The computer program product of claim 39, where: determining the oneor more first control points is performed by the GPU.
 41. The computerprogram product of claim 34, where: texture coordinate data includes UVparameter information comprising a U direction coordinate and a Vdirection coordinate, and where the texture coordinate data is based onthe parameter space of the model; and cross-curvature direction dataincludes a U direction tangent vector giving the direction tangent tothe surface in the U direction and a V direction tangent vector givingthe direction tangent to the surface in the V direction, and scalar datagiving the aspect ratio of parameter space in the U and V directions.42. The computer program product of claim 35 where determining a tangentvector based on the associated texture coordinate data and theassociated cross-curvature direction data includes: determining adifference vector comprising the difference in UV parameter spacebetween the texture coordinates at the first vertex and the texturecoordinates at a second vertex at the other end of a patch edgeassociated with the first vertex; and determining the linear combinationof a U direction tangent vector and a V direction tangent vector at thefirst vertex and weighting the determined linear combination using thedifference vector; and determining the tangent vector based on theweighted linear combination.
 43. A system comprising: acomputer-readable medium comprising a program product; a display device;and one or more first processors operable to interact with the displaydevice and to execute the program product and perform operations forgenerating a quilt representation of a three-dimensional structure, theoperations comprising: generating a first quilt representation of athree-dimensional structure, including: identifying a model of thethree-dimensional structure, the model representing thethree-dimensional structure by a solid representation scheme, where: themodel of the three-dimensional structure is one of: a boundaryrepresentation (B-rep) model, a function representation (F-rep) model,or a constructive solid geometry model (CSG), and faceting the model andgenerating the first quilt representation, the first quiltrepresentation representing the three-dimensional structure by aplurality of patches, the quilt representation being associated with afirst display level of detail, where the faceting is performed by theone or more first processors; adding information to the first quiltrepresentation, including: identifying a surface on thethree-dimensional structure in the model, the surface includingcross-curvature components, identifying a first patch in the pluralityof patches, the first patch including a first plurality of vertices, anda first vertex of the first plurality of vertices being on theidentified surface, using the model, determining texture coordinate datafor the first vertex and associating the texture coordinate data withthe first vertex, using the model, determining cross-curvature directiondata for the first vertex and associating the cross-curvature directiondata with the first vertex; and generating a second quilt representationbased on the first quilt representation, including: determining atangent vector for the first vertex based on the associated texturecoordinate data and the associated cross-curvature direction data,determining one or more first control points for the first patch basedon the first vertex and the tangent vector; and associating the one ormore first control points with the first quilt representation togenerate the second quilt representation, the second quiltrepresentation being associated with a second display level of detail.44. The system of claim 43 where: adding information to the first quiltrepresentation further includes: identifying a second patch in theplurality of patches, the second patch including a second plurality ofvertices, a second vertex being in the second plurality of vertices;determining a normal vector for the second patch using the model, thenormal vector being normal to the surface of the three-dimensionalstructure at the second vertex; and associating the normal vector withthe second vertex; and generating a second quilt representation based onthe first quilt representation further includes: determining one or moresecond control points for the second patch based on the second vertexand the associated normal vector; and faceting the first quiltrepresentation using the one or more second control points.
 45. Thesystem of claim 43 where: generating the second quilt representation isperformed in response to a request for the second display level ofdetail.
 46. The system of claim 43 where: the structure is one of: atorus, a toroid, a toroidal fillet, a helical structure, a helical coil,or another structure including a surface with curvature in directionstangent to the surface.
 47. The system of claim 43, where the operationsfurther comprise: generating a mesh representation of the 3-Ddimensional structure, including faceting the second quiltrepresentation using the one or more control points, the meshrepresentation including a plurality of triangles.
 48. The system ofclaim 43, where: the one or more first processors comprise a centralprocessing unit (CPU); generating the mesh representation is performedby one or more second processors, where the one or more secondprocessors comprise a graphics processing unit (GPU).
 49. The system ofclaim 43, where: determining the one or more first control points isperformed by the GPU.
 50. The system of claim 43, where: texturecoordinate data includes UV parameter information comprising a Udirection coordinate and a V direction coordinate, and where the texturecoordinate data is based on the parameter space of the model; andcross-curvature direction data includes a U direction tangent vectorgiving the direction tangent to the surface in the U direction and a Vdirection tangent vector giving the direction tangent to the surface inthe V direction, and scalar data giving the aspect ratio of parameterspace in the U and V directions.
 51. The system of claim 43 wheredetermining a tangent vector based on the associated texture coordinatedata and the associated cross-curvature direction data includes:determining a difference vector comprising the difference in UVparameter space between the texture coordinates at the first vertex andthe texture coordinates at a second vertex at the other end of a patchedge associated with the first vertex; and determining the linearcombination of a U direction tangent vector and a V direction tangentvector at the first vertex and weighting the determined linearcombination using the difference vector; and determining the tangentvector based on the weighted linear combination.